<HTML><HEAD><META CONTENT="text/html; charset=UTF-8" HTTP-EQUIV="Content-Type"/><TITLE>EMMA Coverage Report</TITLE><STYLE TYPE="text/css"> TABLE,TD,TH {border-style:solid; border-color:black;} TD,TH {background:white;margin:0;line-height:100%;padding-left:0.5em;padding-right:0.5em;} TD {border-width:0 1px 0 0;} TH {border-width:1px 1px 1px 0;} TR TD.h {color:red;} TABLE {border-spacing:0; border-collapse:collapse;border-width:0 0 1px 1px;} P,H1,H2,H3,TH {font-family:verdana,arial,sans-serif;font-size:10pt;} TD {font-family:courier,monospace;font-size:10pt;} TABLE.hdft {border-spacing:0;border-collapse:collapse;border-style:none;} TABLE.hdft TH,TABLE.hdft TD {border-style:none;line-height:normal;} TABLE.hdft TH.tl,TABLE.hdft TD.tl {background:#6699CC;color:white;} TABLE.hdft TD.nv {background:#6633DD;color:white;} .nv A:link {color:white;} .nv A:visited {color:white;} .nv A:active {color:yellow;} TABLE.hdft A:link {color:white;} TABLE.hdft A:visited {color:white;} TABLE.hdft A:active {color:yellow;} .in {color:#356085;} TABLE.s TD {padding-left:0.25em;padding-right:0.25em;} TABLE.s TD.l {padding-left:0.25em;padding-right:0.25em;text-align:right;background:#F0F0F0;} TABLE.s TR.z TD {background:#FF9999;} TABLE.s TR.p TD {background:#FFFF88;} TABLE.s TR.c TD {background:#CCFFCC;} A:link {color:#0000EE;text-decoration:none;} A:visited {color:#0000EE;text-decoration:none;} A:hover {color:#0000EE;text-decoration:underline;} TABLE.cn {border-width:0 0 1px 0;} TABLE.s {border-width:1px 0 1px 1px;} TD.h {color:red;border-width:0 1px 0 0;} TD.f {border-width:0 1px 0 1px;} TD.hf {color:red;border-width:0 1px 0 1px;} TH.f {border-width:1px 1px 1px 1px;} TR.cis TD {background:#F0F0F0;} TR.cis TD {border-width:1px 1px 1px 0;} TR.cis TD.h {color:red;border-width:1px 1px 1px 0;} TR.cis TD.f {border-width:1px 1px 1px 1px;} TR.cis TD.hf {color:red;border-width:1px 1px 1px 1px;} TD.b {border-style:none;background:transparent;line-height:50%;}  TD.bt {border-width:1px 0 0 0;background:transparent;line-height:50%;} TR.o TD {background:#F0F0F0;}TABLE.it {border-style:none;}TABLE.it TD,TABLE.it TH {border-style:none;}</STYLE></HEAD><BODY><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="tl"><A HREF="http://www.eclemma.org/">EMMA</A> Coverage Report (generated Mon May 30 17:02:21 CEST 2011)</TH></TR><TR><TD CLASS="nv">[<A HREF="../Raport testu z wersji alfa 30.05.2011.html">all classes</A>][<A HREF="5.html">com.googlecode.project4uz</A>]</TD></TR></TABLE><H2>COVERAGE SUMMARY FOR SOURCE FILE [<SPAN CLASS="in">RDFEncoder.java</SPAN>]</H2><TABLE CELLSPACING="0" WIDTH="100%"><TR><TH>name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD>RDFEncoder.java</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/44)</TD><TD CLASS="h">0%   (0/1295)</TD><TD CLASS="h">0%   (0/268)</TD></TR></TABLE><H3>COVERAGE BREAKDOWN BY CLASS AND METHOD</H3><TABLE CLASS="cn" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="f">name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#0">RDFEncoder</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/8)</TD><TD CLASS="h">0%   (0/25)</TD><TD CLASS="h">0%   (0/12)</TD></TR><TR><TD CLASS="f"><A HREF="#0">RDFEncoder (FileOutputStream): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/10)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2">close (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#3">flush (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#4">getOwner (): Object</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/2)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#5">setOwner (Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#6">writeExpression (Expression): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#7">writeObject (Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#8">writeStatement (Statement): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#9">RDFEncoder$ObjectReader</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/570)</TD><TD CLASS="h">0%   (0/121)</TD></TR><TR><TD CLASS="f"><A HREF="#9">RDFEncoder$ObjectReader (RDFEncoder, OutputStream): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/17)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#b">getDimension (Object): int</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/15)</TD><TD CLASS="h">0%   (0/6)</TD></TR><TR><TD CLASS="f"><A HREF="#c">getValue (Object, Field): Object</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/16)</TD><TD CLASS="h">0%   (0/7)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#d">isSimpleType (Class): boolean</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/47)</TD><TD CLASS="h">0%   (0/5)</TD></TR><TR><TD CLASS="f"><A HREF="#e">readArray (Object, RDFEncoder$ObjectReader$RDFWriter$Class$Table): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/110)</TD><TD CLASS="h">0%   (0/17)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#f">readCollection (Collection): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/30)</TD><TD CLASS="h">0%   (0/7)</TD></TR><TR><TD CLASS="f"><A HREF="#10">readMap (Map): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/57)</TD><TD CLASS="h">0%   (0/10)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#11">readObject (Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/124)</TD><TD CLASS="h">0%   (0/27)</TD></TR><TR><TD CLASS="f"><A HREF="#12">readReference (Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/113)</TD><TD CLASS="h">0%   (0/23)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#13">readSerialVersion (Object, RDFEncoder$ObjectReader$RDFWriter$Class): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/29)</TD><TD CLASS="h">0%   (0/9)</TD></TR><TR><TD CLASS="f"><A HREF="#14">saveObject (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/12)</TD><TD CLASS="h">0%   (0/6)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#15">RDFEncoder$ObjectReader$RDFWriter</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/8)</TD><TD CLASS="h">0%   (0/236)</TD><TD CLASS="h">0%   (0/50)</TD></TR><TR><TD CLASS="f"><A HREF="#15">RDFEncoder$ObjectReader$RDFWriter (RDFEncoder$ObjectReader, FileOutputStream)...</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/22)</TD><TD CLASS="h">0%   (0/9)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#17">addClassToImport (String, int): RDFEncoder$ObjectReader$RDFWriter$Class</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#18">addClassToMain (String, int): RDFEncoder$ObjectReader$RDFWriter$Class</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#19">getImportSection (): Element</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/3)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#1a">getMainSection (): Element</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/3)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1b">initializeDocument (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/75)</TD><TD CLASS="h">0%   (0/14)</TD></TR><TR><TD CLASS="f"><A HREF="#1c">initializeNameSpaces (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/81)</TD><TD CLASS="h">0%   (0/17)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1d">write (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/30)</TD><TD CLASS="h">0%   (0/6)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#1e">RDFEncoder$ObjectReader$RDFWriter$Class</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/8)</TD><TD CLASS="h">0%   (0/227)</TD><TD CLASS="h">0%   (0/40)</TD></TR><TR><TD CLASS="f"><A HREF="#1e">RDFEncoder$ObjectReader$RDFWriter$Class (RDFEncoder$ObjectReader$RDFWriter, S...</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/46)</TD><TD CLASS="h">0%   (0/10)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#20">addNullReference (String): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/21)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR><TD CLASS="f"><A HREF="#21">addPrimitive (String, String, String): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/34)</TD><TD CLASS="h">0%   (0/5)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#22">addReference (String, String, int): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/31)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR><TD CLASS="f"><A HREF="#23">addSerialVersion (String): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/25)</TD><TD CLASS="h">0%   (0/5)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#24">addTable (String, String, int, int): RDFEncoder$ObjectReader$RDFWriter$Class$...</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/64)</TD><TD CLASS="h">0%   (0/10)</TD></TR><TR><TD CLASS="f"><A HREF="#25">getId (): int</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/3)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#26">getSciezkaKlasy (): String</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/3)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#27">RDFEncoder$ObjectReader$RDFWriter$Class$Table</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/9)</TD><TD CLASS="h">0%   (0/237)</TD><TD CLASS="h">0%   (0/45)</TD></TR><TR><TD CLASS="f"><A HREF="#27">RDFEncoder$ObjectReader$RDFWriter$Class$Table (RDFEncoder$ObjectReader$RDFWri...</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/28)</TD><TD CLASS="h">0%   (0/7)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#29">addNullElement (int): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/21)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR><TD CLASS="f"><A HREF="#2a">addObjectElement (int, String, int): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/31)</TD><TD CLASS="h">0%   (0/5)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2b">addPrimitiveElement (int, String): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/26)</TD><TD CLASS="h">0%   (0/5)</TD></TR><TR><TD CLASS="f"><A HREF="#2c">getHierarchiaWymiarow (): String</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/3)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2d">initialize (): RDFEncoder$ObjectReader$RDFWriter$Class$Table</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/44)</TD><TD CLASS="h">0%   (0/9)</TD></TR><TR><TD CLASS="f"><A HREF="#2e">makeName (String, String): RDFEncoder$ObjectReader$RDFWriter$Class$Table</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/26)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2f">makeNewDimension (int, int): RDFEncoder$ObjectReader$RDFWriter$Class$Table</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/37)</TD><TD CLASS="h">0%   (0/6)</TD></TR><TR><TD CLASS="f"><A HREF="#30">referenceForNewDimension (int, String): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/21)</TD><TD CLASS="h">0%   (0/4)</TD></TR></TABLE><P></P><TABLE CLASS="s" CELLSPACING="0" WIDTH="100%"><TR><TD CLASS="l">1</TD><TD>package com.googlecode.project4uz;</TD></TR><TR><TD CLASS="l">2</TD><TD> </TD></TR><TR><TD CLASS="l">3</TD><TD>import java.beans.Expression;</TD></TR><TR><TD CLASS="l">4</TD><TD>import java.beans.Statement;</TD></TR><TR><TD CLASS="l">5</TD><TD>import java.io.FileOutputStream;</TD></TR><TR><TD CLASS="l">6</TD><TD>import java.io.OutputStream;</TD></TR><TR><TD CLASS="l">7</TD><TD>import java.lang.reflect.Array;</TD></TR><TR><TD CLASS="l">8</TD><TD>import java.lang.reflect.Field;</TD></TR><TR><TD CLASS="l">9</TD><TD>import java.lang.reflect.Modifier;</TD></TR><TR><TD CLASS="l">10</TD><TD>import java.util.Collection;</TD></TR><TR><TD CLASS="l">11</TD><TD>import java.util.Iterator;</TD></TR><TR><TD CLASS="l">12</TD><TD>import java.util.Map;</TD></TR><TR><TD CLASS="l">13</TD><TD>import javax.xml.parsers.DocumentBuilder;</TD></TR><TR><TD CLASS="l">14</TD><TD>import javax.xml.parsers.DocumentBuilderFactory;</TD></TR><TR><TD CLASS="l">15</TD><TD>import javax.xml.parsers.ParserConfigurationException;</TD></TR><TR><TD CLASS="l">16</TD><TD>import javax.xml.transform.OutputKeys;</TD></TR><TR><TD CLASS="l">17</TD><TD>import javax.xml.transform.Transformer;</TD></TR><TR><TD CLASS="l">18</TD><TD>import javax.xml.transform.TransformerException;</TD></TR><TR><TD CLASS="l">19</TD><TD>import javax.xml.transform.TransformerFactory;</TD></TR><TR><TD CLASS="l">20</TD><TD>import javax.xml.transform.TransformerFactoryConfigurationError;</TD></TR><TR><TD CLASS="l">21</TD><TD>import javax.xml.transform.dom.DOMSource;</TD></TR><TR><TD CLASS="l">22</TD><TD>import javax.xml.transform.stream.StreamResult;</TD></TR><TR><TD CLASS="l">23</TD><TD>import org.w3c.dom.Document;</TD></TR><TR><TD CLASS="l">24</TD><TD>import org.w3c.dom.Element;</TD></TR><TR><TD CLASS="l">25</TD><TD>import org.w3c.dom.Text;</TD></TR><TR><TD CLASS="l">26</TD><TD> </TD></TR><TR><TD CLASS="l">27</TD><TD>import edu.uz.issilab.rdfserializer.interfaces.RDFEncodeable;</TD></TR><TR><TD CLASS="l">28</TD><TD> </TD></TR><TR><TD CLASS="l">29</TD><TD>/**</TD></TR><TR><TD CLASS="l">30</TD><TD> * Klasa pozwala na zapisanie obiektĂłw do strumienia znakowego</TD></TR><TR><TD CLASS="l">31</TD><TD> * w formacie RDF.</TD></TR><TR><TD CLASS="l">32</TD><TD> * @author Daniel Kur &lt;BR&gt;Kamil BuĹ›</TD></TR><TR><TD CLASS="l">33</TD><TD> * @version 1.0</TD></TR><TR><TD CLASS="l">34</TD><TD> */</TD></TR><TR><TD CLASS="l">35</TD><TD>public class RDFEncoder implements RDFEncodeable {</TD></TR><TR><TD CLASS="l">36</TD><TD>        /**</TD></TR><TR><TD CLASS="l"><A NAME="0">37</A></TD><TD>         * Klasa wykrywajÄ…ca obiekty przesĹ‚ane do strumienia.</TD></TR><TR><TD CLASS="l">38</TD><TD>         */</TD></TR><TR><TD CLASS="l">39</TD><TD>        private ObjectReader objectReader;</TD></TR><TR><TD CLASS="l">40</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">41</TD><TD>        public RDFEncoder(final FileOutputStream out) throws ParserConfigurationException {</TD></TR><TR CLASS="z"><TD CLASS="l">42</TD><TD>                this.objectReader = new ObjectReader(out);</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="5">43</A></TD><TD>    }</TD></TR><TR><TD CLASS="l">44</TD><TD> </TD></TR><TR><TD CLASS="l">45</TD><TD>        public void setOwner(final Object owner) {</TD></TR><TR><TD CLASS="l">46</TD><TD>                // TODO Auto-generated method stub</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="4">47</A></TD><TD>        }</TD></TR><TR><TD CLASS="l">48</TD><TD> </TD></TR><TR><TD CLASS="l">49</TD><TD>        public Object getOwner() {</TD></TR><TR><TD CLASS="l">50</TD><TD>                // TODO Auto-generated method stub</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="7">51</A></TD><TD>                return null;</TD></TR><TR><TD CLASS="l">52</TD><TD>        }</TD></TR><TR><TD CLASS="l">53</TD><TD> </TD></TR><TR><TD CLASS="l">54</TD><TD>        public void writeObject(final Object o) {</TD></TR><TR CLASS="z"><TD CLASS="l">55</TD><TD>                objectReader.readObject(o);</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="8">56</A></TD><TD>        }</TD></TR><TR><TD CLASS="l">57</TD><TD> </TD></TR><TR><TD CLASS="l">58</TD><TD>        public void writeStatement(final Statement oldStm) {</TD></TR><TR><TD CLASS="l">59</TD><TD>                // TODO Auto-generated method stub</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="6">60</A></TD><TD>        }</TD></TR><TR><TD CLASS="l">61</TD><TD> </TD></TR><TR><TD CLASS="l">62</TD><TD>        public void writeExpression(final Expression oldExp) {</TD></TR><TR><TD CLASS="l">63</TD><TD>                // TODO Auto-generated method stub</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="3">64</A></TD><TD>        }</TD></TR><TR><TD CLASS="l">65</TD><TD> </TD></TR><TR><TD CLASS="l">66</TD><TD>        public void flush() {</TD></TR><TR><TD CLASS="l"><A NAME="2">67</A></TD><TD>                // TODO Auto-generated method stub</TD></TR><TR CLASS="z"><TD CLASS="l">68</TD><TD>        }</TD></TR><TR><TD CLASS="l">69</TD><TD> </TD></TR><TR><TD CLASS="l">70</TD><TD>        public void close() {</TD></TR><TR CLASS="z"><TD CLASS="l">71</TD><TD>                objectReader.saveObject();</TD></TR><TR CLASS="z"><TD CLASS="l">72</TD><TD>        }</TD></TR><TR><TD CLASS="l">73</TD><TD> </TD></TR><TR><TD CLASS="l">74</TD><TD>        /**</TD></TR><TR><TD CLASS="l">75</TD><TD>         * Klasa odczytujaca publiczne pola z obiektow, wspoldziala z RDFWriter.</TD></TR><TR><TD CLASS="l">76</TD><TD>         * Razem serializuja obiekt do formatu RDF. Pomija pola oznaczone modyfikatorami:</TD></TR><TR><TD CLASS="l">77</TD><TD>         * final, static oraz transient. Potrafi odczytac prywatne pole serialVersionUID.</TD></TR><TR><TD CLASS="l">78</TD><TD>         * Dla uzyskania wiekszej ilosci informacji, polecam przejrzec dokument</TD></TR><TR><TD CLASS="l">79</TD><TD>         * Mechanizm_refleksji na wiki.</TD></TR><TR><TD CLASS="l">80</TD><TD>         * @author Daniel Kur</TD></TR><TR><TD CLASS="l">81</TD><TD>         * @version 0.4</TD></TR><TR><TD CLASS="l">82</TD><TD>         * @see http://code.google.com/p/project4uz/wiki/Mechanizm_refleksji</TD></TR><TR><TD CLASS="l">83</TD><TD>         */</TD></TR><TR><TD CLASS="l">84</TD><TD>        protected class ObjectReader {</TD></TR><TR><TD CLASS="l">85</TD><TD>                /**</TD></TR><TR><TD CLASS="l">86</TD><TD>                 * Obiekt zapisujacy serializowane klasy do formatu RDF/XML</TD></TR><TR><TD CLASS="l">87</TD><TD>                 */</TD></TR><TR><TD CLASS="l">88</TD><TD>                private RDFWriter writer;</TD></TR><TR><TD CLASS="l">89</TD><TD>                </TD></TR><TR><TD CLASS="l">90</TD><TD>                /**</TD></TR><TR><TD CLASS="l">91</TD><TD>                 * Identyfikator dla sekcji import w RDFWriter</TD></TR><TR><TD CLASS="l">92</TD><TD>                 */</TD></TR><TR><TD CLASS="l">93</TD><TD>                private int id;</TD></TR><TR><TD CLASS="l">94</TD><TD> </TD></TR><TR><TD CLASS="l">95</TD><TD>                /**</TD></TR><TR><TD CLASS="l">96</TD><TD>                 * Konstruktor parametrowy klasy odczytujacej publiczne pola z obiektow.</TD></TR><TR><TD CLASS="l">97</TD><TD>                 * @param out nazwa pliku, gdzie zapisujemy serializowany obiekt</TD></TR><TR><TD CLASS="l">98</TD><TD>                 * @throws ParserConfigurationException</TD></TR><TR><TD CLASS="l"><A NAME="9">99</A></TD><TD>                 */</TD></TR><TR CLASS="z"><TD CLASS="l">100</TD><TD>                protected ObjectReader(final OutputStream out) throws ParserConfigurationException {</TD></TR><TR CLASS="z"><TD CLASS="l">101</TD><TD>                        this.writer = new RDFWriter ((FileOutputStream)out);</TD></TR><TR CLASS="z"><TD CLASS="l">102</TD><TD>                        this.id = 1;</TD></TR><TR CLASS="z"><TD CLASS="l">103</TD><TD>                }</TD></TR><TR><TD CLASS="l">104</TD><TD> </TD></TR><TR><TD CLASS="l">105</TD><TD>                /**</TD></TR><TR><TD CLASS="l">106</TD><TD>                 * Zapisuje plik z serializowanymi obiektami.</TD></TR><TR><TD CLASS="l"><A NAME="14">107</A></TD><TD>                 * @see RDFWriter</TD></TR><TR><TD CLASS="l">108</TD><TD>                 */</TD></TR><TR><TD CLASS="l">109</TD><TD>                protected final void saveObject() {</TD></TR><TR><TD CLASS="l">110</TD><TD>                        try {</TD></TR><TR CLASS="z"><TD CLASS="l">111</TD><TD>                                writer.write();</TD></TR><TR><TD CLASS="l">112</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">113</TD><TD>                        catch (TransformerFactoryConfigurationError e) {</TD></TR><TR CLASS="z"><TD CLASS="l">114</TD><TD>                                e.printStackTrace();</TD></TR><TR><TD CLASS="l">115</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">116</TD><TD>                        catch (TransformerException e) {</TD></TR><TR CLASS="z"><TD CLASS="l">117</TD><TD>                                e.printStackTrace();</TD></TR><TR><TD CLASS="l">118</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">119</TD><TD>                }</TD></TR><TR><TD CLASS="l">120</TD><TD> </TD></TR><TR><TD CLASS="l">121</TD><TD>                /**</TD></TR><TR><TD CLASS="l">122</TD><TD>                 * Odczytuje klase i wyciaga z niej publiczne pola.</TD></TR><TR><TD CLASS="l"><A NAME="11">123</A></TD><TD>                 * Wersja dla sekcji Main.</TD></TR><TR><TD CLASS="l">124</TD><TD>                 * @param object dowolny obiekt do refleksji</TD></TR><TR><TD CLASS="l">125</TD><TD>                 */</TD></TR><TR><TD CLASS="l">126</TD><TD>                protected final void readObject(final Object object) {</TD></TR><TR CLASS="z"><TD CLASS="l">127</TD><TD>                        if (object == null) {</TD></TR><TR CLASS="z"><TD CLASS="l">128</TD><TD>                                System.out.println(&#34;Obiekt jest pusta referencja!&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">129</TD><TD>                                return;</TD></TR><TR><TD CLASS="l">130</TD><TD>                        }</TD></TR><TR><TD CLASS="l">131</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">132</TD><TD>                        java.lang.Class&lt;?&gt; c = object.getClass();</TD></TR><TR CLASS="z"><TD CLASS="l">133</TD><TD>                        Field[] publicFields = c.getFields();</TD></TR><TR CLASS="z"><TD CLASS="l">134</TD><TD>                        RDFWriter.Class cls = writer.addClassToMain(c.getName(), id);</TD></TR><TR CLASS="z"><TD CLASS="l">135</TD><TD>                        readSerialVersion(object, cls);</TD></TR><TR CLASS="z"><TD CLASS="l">136</TD><TD>                        id++;</TD></TR><TR CLASS="z"><TD CLASS="l">137</TD><TD>                        for (Field field : publicFields) {</TD></TR><TR CLASS="z"><TD CLASS="l">138</TD><TD>                                int modifier = field.getModifiers();</TD></TR><TR CLASS="z"><TD CLASS="l">139</TD><TD>                                if(Modifier.isFinal(modifier) || Modifier.isStatic(modifier) || Modifier.isTransient(modifier))</TD></TR><TR CLASS="z"><TD CLASS="l">140</TD><TD>                                        continue;</TD></TR><TR><TD CLASS="l">141</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">142</TD><TD>                                java.lang.Class&lt;?&gt; type = field.getType();</TD></TR><TR CLASS="z"><TD CLASS="l">143</TD><TD>                                String name = field.getName();                        </TD></TR><TR CLASS="z"><TD CLASS="l">144</TD><TD>                                Object value = getValue(object, field);</TD></TR><TR><TD CLASS="l">145</TD><TD>                                </TD></TR><TR CLASS="z"><TD CLASS="l">146</TD><TD>                                if (value == null)</TD></TR><TR CLASS="z"><TD CLASS="l">147</TD><TD>                                        cls.addNullReference(name);</TD></TR><TR CLASS="z"><TD CLASS="l">148</TD><TD>                                else if (isSimpleType(value.getClass())) {</TD></TR><TR CLASS="z"><TD CLASS="l">149</TD><TD>                                        cls.addPrimitive ( name, type.getSimpleName(), value.toString());</TD></TR><TR><TD CLASS="l">150</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">151</TD><TD>                                else if (type.isArray()) {</TD></TR><TR CLASS="z"><TD CLASS="l">152</TD><TD>                                        RDFWriter.Class.Table tab = cls.addTable(name, type.getComponentType().getSimpleName(),</TD></TR><TR CLASS="z"><TD CLASS="l">153</TD><TD>                                                        getDimension(value), Array.getLength(value));</TD></TR><TR CLASS="z"><TD CLASS="l">154</TD><TD>                                        tab.initialize();</TD></TR><TR CLASS="z"><TD CLASS="l">155</TD><TD>                                        this.readArray(value, tab);</TD></TR><TR><TD CLASS="l">156</TD><TD>                                }</TD></TR><TR><TD CLASS="l">157</TD><TD>                                /*</TD></TR><TR><TD CLASS="l">158</TD><TD>                                else if ( value instanceof java.util.Collection&lt;?&gt; )</TD></TR><TR><TD CLASS="l">159</TD><TD>                                {</TD></TR><TR><TD CLASS="l">160</TD><TD>                                        System.out.print ( Modifier.toString ( modifier ) + &#34; &#34; + type.getSimpleName() </TD></TR><TR><TD CLASS="l">161</TD><TD>                                        + &#34; &#34; + name +&#34; = {  &#34; );</TD></TR><TR><TD CLASS="l">162</TD><TD>                                        this.readCollection ( (Collection&lt;?&gt;) value );</TD></TR><TR><TD CLASS="l">163</TD><TD>                                        System.out.println ( &#34;}&#34; );</TD></TR><TR><TD CLASS="l">164</TD><TD>                                }</TD></TR><TR><TD CLASS="l">165</TD><TD>                                else if ( value instanceof java.util.Map&lt;?, ?&gt; )</TD></TR><TR><TD CLASS="l">166</TD><TD>                                {</TD></TR><TR><TD CLASS="l">167</TD><TD>                                        System.out.print ( Modifier.toString ( modifier ) + &#34; &#34; + type.getSimpleName() </TD></TR><TR><TD CLASS="l">168</TD><TD>                                        + &#34; &#34; + name +&#34; = {  &#34; );</TD></TR><TR><TD CLASS="l">169</TD><TD>                                        this.readMap ( (Map&lt;?, ?&gt;) value );</TD></TR><TR><TD CLASS="l">170</TD><TD>                                        System.out.println ( &#34;}&#34; );</TD></TR><TR><TD CLASS="l">171</TD><TD>                                }</TD></TR><TR><TD CLASS="l">172</TD><TD>                                */</TD></TR><TR><TD CLASS="l">173</TD><TD>                                else {</TD></TR><TR CLASS="z"><TD CLASS="l">174</TD><TD>                                        cls.addReference(name, value.getClass().getName(), id);</TD></TR><TR CLASS="z"><TD CLASS="l">175</TD><TD>                                        this.readReference(value);</TD></TR><TR><TD CLASS="l">176</TD><TD>                                }</TD></TR><TR><TD CLASS="l">177</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">178</TD><TD>                }</TD></TR><TR><TD CLASS="l">179</TD><TD> </TD></TR><TR><TD CLASS="l">180</TD><TD>                /**</TD></TR><TR><TD CLASS="l">181</TD><TD>                 * Odczytuje klase i wyciaga z niej publiczne pola.</TD></TR><TR><TD CLASS="l"><A NAME="12">182</A></TD><TD>                 * Wersja dla sekcji Import.</TD></TR><TR><TD CLASS="l">183</TD><TD>                 * @param object dowolny obiekt do refleksji</TD></TR><TR><TD CLASS="l">184</TD><TD>                 */</TD></TR><TR><TD CLASS="l">185</TD><TD>                private final void readReference(final Object object) {</TD></TR><TR CLASS="z"><TD CLASS="l">186</TD><TD>                        java.lang.Class&lt;?&gt; c = object.getClass();</TD></TR><TR CLASS="z"><TD CLASS="l">187</TD><TD>                        Field[] publicFields = c.getFields();</TD></TR><TR CLASS="z"><TD CLASS="l">188</TD><TD>                        RDFWriter.Class cls = writer.addClassToImport(c.getName() ,id);</TD></TR><TR CLASS="z"><TD CLASS="l">189</TD><TD>                        id++;</TD></TR><TR CLASS="z"><TD CLASS="l">190</TD><TD>                        for (Field field : publicFields) {</TD></TR><TR CLASS="z"><TD CLASS="l">191</TD><TD>                                int modifier = field.getModifiers();</TD></TR><TR CLASS="z"><TD CLASS="l">192</TD><TD>                                if(Modifier.isFinal(modifier) || Modifier.isStatic (modifier) || Modifier.isTransient (modifier))</TD></TR><TR CLASS="z"><TD CLASS="l">193</TD><TD>                                        continue;</TD></TR><TR><TD CLASS="l">194</TD><TD>                                </TD></TR><TR CLASS="z"><TD CLASS="l">195</TD><TD>                                java.lang.Class&lt;?&gt; type = field.getType();</TD></TR><TR CLASS="z"><TD CLASS="l">196</TD><TD>                                String name = field.getName();                        </TD></TR><TR CLASS="z"><TD CLASS="l">197</TD><TD>                                Object value = getValue(object, field);</TD></TR><TR><TD CLASS="l">198</TD><TD>                                </TD></TR><TR CLASS="z"><TD CLASS="l">199</TD><TD>                                if(value == null)</TD></TR><TR CLASS="z"><TD CLASS="l">200</TD><TD>                                        cls.addNullReference(name);</TD></TR><TR CLASS="z"><TD CLASS="l">201</TD><TD>                                else if( this.isSimpleType(value.getClass())) {</TD></TR><TR CLASS="z"><TD CLASS="l">202</TD><TD>                                        cls.addPrimitive(name, type.getSimpleName(), value.toString());</TD></TR><TR><TD CLASS="l">203</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">204</TD><TD>                                else if (type.isArray()) {</TD></TR><TR CLASS="z"><TD CLASS="l">205</TD><TD>                                        RDFWriter.Class.Table tab = cls.addTable(name, type.getSimpleName(),</TD></TR><TR CLASS="z"><TD CLASS="l">206</TD><TD>                                                        getDimension(value), Array.getLength(value));</TD></TR><TR CLASS="z"><TD CLASS="l">207</TD><TD>                                        tab.initialize();</TD></TR><TR CLASS="z"><TD CLASS="l">208</TD><TD>                                        this.readArray(value,tab);</TD></TR><TR><TD CLASS="l">209</TD><TD>                                }</TD></TR><TR><TD CLASS="l">210</TD><TD>                                /*</TD></TR><TR><TD CLASS="l">211</TD><TD>                                else if ( value instanceof java.util.Collection&lt;?&gt; )</TD></TR><TR><TD CLASS="l">212</TD><TD>                                {</TD></TR><TR><TD CLASS="l">213</TD><TD>                                        System.out.print ( Modifier.toString ( modifier ) + &#34; &#34;</TD></TR><TR><TD CLASS="l">214</TD><TD>                                        + type.getSimpleName () + &#34; &#34; + name +&#34; = {  &#34; );</TD></TR><TR><TD CLASS="l">215</TD><TD>                                        this.readCollection ( (Collection&lt;?&gt;) value );</TD></TR><TR><TD CLASS="l">216</TD><TD>                                        System.out.println ( &#34;}&#34; );</TD></TR><TR><TD CLASS="l">217</TD><TD>                                }</TD></TR><TR><TD CLASS="l">218</TD><TD>                                else if ( value instanceof java.util.Map&lt;?, ?&gt; )</TD></TR><TR><TD CLASS="l">219</TD><TD>                                {</TD></TR><TR><TD CLASS="l">220</TD><TD>                                        System.out.print ( Modifier.toString ( modifier ) + &#34; &#34;</TD></TR><TR><TD CLASS="l">221</TD><TD>                                        + type.getSimpleName () + &#34; &#34; + name +&#34; = {  &#34; );</TD></TR><TR><TD CLASS="l">222</TD><TD>                                        this.readMap ( (Map&lt;?, ?&gt;) value );</TD></TR><TR><TD CLASS="l">223</TD><TD>                                        System.out.println ( &#34;}&#34; );</TD></TR><TR><TD CLASS="l">224</TD><TD>                                }</TD></TR><TR><TD CLASS="l">225</TD><TD>                                */</TD></TR><TR><TD CLASS="l">226</TD><TD>                                else {</TD></TR><TR CLASS="z"><TD CLASS="l">227</TD><TD>                                        cls.addReference(name, value.getClass().getName(), id);</TD></TR><TR CLASS="z"><TD CLASS="l">228</TD><TD>                                        this.readReference(value);</TD></TR><TR><TD CLASS="l">229</TD><TD>                                }</TD></TR><TR><TD CLASS="l">230</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">231</TD><TD>                }</TD></TR><TR><TD CLASS="l">232</TD><TD>                </TD></TR><TR><TD CLASS="l">233</TD><TD>                /**</TD></TR><TR><TD CLASS="l">234</TD><TD>                 * Odczytuje pola zarowno jednowymiarowych, jak i wielowymiarowych tablic.</TD></TR><TR><TD CLASS="l"><A NAME="e">235</A></TD><TD>                 * </TD></TR><TR><TD CLASS="l">236</TD><TD>                 * @param array tablica danych</TD></TR><TR><TD CLASS="l">237</TD><TD>                 */</TD></TR><TR><TD CLASS="l">238</TD><TD>                private final void readArray(final Object array, final RDFWriter.Class.Table tab) {</TD></TR><TR CLASS="z"><TD CLASS="l">239</TD><TD>                        if(isSimpleType(array.getClass().getComponentType()))</TD></TR><TR CLASS="z"><TD CLASS="l">240</TD><TD>                                for(int i = 0; i &lt; Array.getLength ( array ); i++)</TD></TR><TR CLASS="z"><TD CLASS="l">241</TD><TD>                                        if(Array.get ( array, i ) == null)</TD></TR><TR CLASS="z"><TD CLASS="l">242</TD><TD>                                                tab.addNullElement(i+1);</TD></TR><TR><TD CLASS="l">243</TD><TD>                                        else</TD></TR><TR CLASS="z"><TD CLASS="l">244</TD><TD>                                                tab.addPrimitiveElement ( i+1, Array.get ( array, i ).toString () );</TD></TR><TR CLASS="z"><TD CLASS="l">245</TD><TD>                        else if(array.getClass ().getComponentType ().isArray ())</TD></TR><TR CLASS="z"><TD CLASS="l">246</TD><TD>                                for(int i = 0; i &lt; Array.getLength(array); i++)</TD></TR><TR CLASS="z"><TD CLASS="l">247</TD><TD>                                        if(Array.get ( array, i ) == null)</TD></TR><TR CLASS="z"><TD CLASS="l">248</TD><TD>                                                tab.addNullElement(i+1);</TD></TR><TR><TD CLASS="l">249</TD><TD>                                        else {</TD></TR><TR CLASS="z"><TD CLASS="l">250</TD><TD>                                                RDFWriter.Class.Table podwymiar = tab.makeNewDimension (i+1, Array.getLength(Array.get(array, i)));</TD></TR><TR CLASS="z"><TD CLASS="l">251</TD><TD>                                                this.readArray(Array.get(array, i), podwymiar);</TD></TR><TR><TD CLASS="l">252</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">253</TD><TD>                        else</TD></TR><TR CLASS="z"><TD CLASS="l">254</TD><TD>                                for(int i = 0; i &lt; Array.getLength(array); i++)</TD></TR><TR CLASS="z"><TD CLASS="l">255</TD><TD>                                        if(Array.get(array, i) == null)</TD></TR><TR CLASS="z"><TD CLASS="l">256</TD><TD>                                                tab.addNullElement(i+1);</TD></TR><TR><TD CLASS="l">257</TD><TD>                                        else {</TD></TR><TR CLASS="z"><TD CLASS="l">258</TD><TD>                                                tab.addObjectElement(i+1, Array.get(array, i).getClass().getName(), id);</TD></TR><TR CLASS="z"><TD CLASS="l">259</TD><TD>                                                this.readReference(Array.get(array, i));</TD></TR><TR><TD CLASS="l">260</TD><TD>                                        }</TD></TR><TR CLASS="z"><TD CLASS="l">261</TD><TD>                }</TD></TR><TR><TD CLASS="l">262</TD><TD> </TD></TR><TR><TD CLASS="l">263</TD><TD>                /**</TD></TR><TR><TD CLASS="l"><A NAME="f">264</A></TD><TD>                 * Odczytuje kolejne pola w kolekcjach.</TD></TR><TR><TD CLASS="l">265</TD><TD>                 * @param collection kolekcja danych</TD></TR><TR><TD CLASS="l">266</TD><TD>                 */</TD></TR><TR><TD CLASS="l">267</TD><TD>                private final void readCollection(final Collection&lt;?&gt; collection) {</TD></TR><TR CLASS="z"><TD CLASS="l">268</TD><TD>                        Iterator&lt;?&gt; i = collection.iterator();</TD></TR><TR CLASS="z"><TD CLASS="l">269</TD><TD>                        while (i.hasNext()) {</TD></TR><TR CLASS="z"><TD CLASS="l">270</TD><TD>                                Object value = i.next ();</TD></TR><TR CLASS="z"><TD CLASS="l">271</TD><TD>                                if (isSimpleType(value.getClass())) {</TD></TR><TR CLASS="z"><TD CLASS="l">272</TD><TD>                                        System.out.print(value + &#34;  &#34;); </TD></TR><TR><TD CLASS="l">273</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">274</TD><TD>                                else {</TD></TR><TR CLASS="z"><TD CLASS="l">275</TD><TD>                                        this.readReference(value);</TD></TR><TR><TD CLASS="l">276</TD><TD>                                }</TD></TR><TR><TD CLASS="l">277</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">278</TD><TD>                }</TD></TR><TR><TD CLASS="l">279</TD><TD> </TD></TR><TR><TD CLASS="l">280</TD><TD>                /**</TD></TR><TR><TD CLASS="l"><A NAME="10">281</A></TD><TD>                 * Odczytuje kolejne pola w mapach.</TD></TR><TR><TD CLASS="l">282</TD><TD>                 * @param map mapa danych</TD></TR><TR><TD CLASS="l">283</TD><TD>                 */</TD></TR><TR><TD CLASS="l">284</TD><TD>                private final void readMap (final Map&lt;?, ?&gt; map) {</TD></TR><TR CLASS="z"><TD CLASS="l">285</TD><TD>                        Iterator&lt;?&gt; i = map.entrySet().iterator();</TD></TR><TR CLASS="z"><TD CLASS="l">286</TD><TD>                        while (i.hasNext()) {</TD></TR><TR CLASS="z"><TD CLASS="l">287</TD><TD>                                Map.Entry&lt;?, ?&gt; value = (Map.Entry&lt;?, ?&gt;)i.next();</TD></TR><TR CLASS="z"><TD CLASS="l">288</TD><TD>                                if ( isSimpleType ( value.getKey ().getClass () ) )</TD></TR><TR CLASS="z"><TD CLASS="l">289</TD><TD>                                        System.out.print ( value.getKey () + &#34; - &#34; );</TD></TR><TR><TD CLASS="l">290</TD><TD>                                else</TD></TR><TR CLASS="z"><TD CLASS="l">291</TD><TD>                                        this.readReference( value.getKey () );</TD></TR><TR><TD CLASS="l">292</TD><TD>                                </TD></TR><TR CLASS="z"><TD CLASS="l">293</TD><TD>                                if(isSimpleType(value.getValue().getClass()))</TD></TR><TR CLASS="z"><TD CLASS="l">294</TD><TD>                                        System.out.print (value.getValue() + &#34;  &#34;);</TD></TR><TR><TD CLASS="l">295</TD><TD>                                else</TD></TR><TR CLASS="z"><TD CLASS="l">296</TD><TD>                                        this.readReference(value.getValue());</TD></TR><TR><TD CLASS="l">297</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">298</TD><TD>                }</TD></TR><TR><TD CLASS="l">299</TD><TD> </TD></TR><TR><TD CLASS="l">300</TD><TD>                /**</TD></TR><TR><TD CLASS="l">301</TD><TD>                 * Odczytuje prywatne pole serialVersionUID klasy.</TD></TR><TR><TD CLASS="l"><A NAME="13">302</A></TD><TD>                 * @param object do odczytu serialVersionUID</TD></TR><TR><TD CLASS="l">303</TD><TD>                 */</TD></TR><TR><TD CLASS="l">304</TD><TD>                private final void readSerialVersion (final Object object, final RDFWriter.Class cls) {</TD></TR><TR><TD CLASS="l">305</TD><TD>                        try {</TD></TR><TR CLASS="z"><TD CLASS="l">306</TD><TD>                                Field serialField = object.getClass().getDeclaredField(&#34;serialVersionUID&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">307</TD><TD>                                serialField.setAccessible(true);</TD></TR><TR CLASS="z"><TD CLASS="l">308</TD><TD>                                Long serialVersionUID = (Long)getValue(object, serialField);</TD></TR><TR CLASS="z"><TD CLASS="l">309</TD><TD>                                cls.addSerialVersion(serialVersionUID.toString());</TD></TR><TR><TD CLASS="l">310</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">311</TD><TD>                        catch (SecurityException e) {</TD></TR><TR CLASS="z"><TD CLASS="l">312</TD><TD>                                System.err.println (&#34;Brak uprawnien do odczytu pola serialVersionUID!&#34;);</TD></TR><TR><TD CLASS="l">313</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">314</TD><TD>                        catch (NoSuchFieldException e) {</TD></TR><TR CLASS="z"><TD CLASS="l">315</TD><TD>                                System.err.println(&#34;Brak pola serialVersionUID!&#34;);</TD></TR><TR><TD CLASS="l">316</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">317</TD><TD>                }</TD></TR><TR><TD CLASS="l">318</TD><TD> </TD></TR><TR><TD CLASS="l">319</TD><TD>                /**</TD></TR><TR><TD CLASS="l">320</TD><TD>                 * Sprawdza podany typ, czy jest referencyjny, czy prosty.</TD></TR><TR><TD CLASS="l"><A NAME="d">321</A></TD><TD>                 * @param type dowolna klasa stworzona na podstawie obiektu</TD></TR><TR><TD CLASS="l">322</TD><TD>                 * @return true typ jest prosty, false typ jest referencyjny</TD></TR><TR><TD CLASS="l">323</TD><TD>                 */</TD></TR><TR><TD CLASS="l">324</TD><TD>                private final boolean isSimpleType (final java.lang.Class&lt;?&gt; type) {</TD></TR><TR CLASS="z"><TD CLASS="l">325</TD><TD>                        if ( type.equals ( Boolean.class )|| type.equals ( Byte.class )   || type.equals ( Character.class )||</TD></TR><TR CLASS="z"><TD CLASS="l">326</TD><TD>                                 type.equals ( Short.class )  || type.equals ( Integer.class )|| type.equals ( Long.class )     ||</TD></TR><TR CLASS="z"><TD CLASS="l">327</TD><TD>                                 type.equals ( Float.class )  || type.equals ( Double.class ) || type.equals ( String.class )   ||</TD></TR><TR CLASS="z"><TD CLASS="l">328</TD><TD>                                 type.equals ( Void.class )   || type.isPrimitive () ) return true;</TD></TR><TR CLASS="z"><TD CLASS="l">329</TD><TD>                        return false;</TD></TR><TR><TD CLASS="l">330</TD><TD>                }</TD></TR><TR><TD CLASS="l">331</TD><TD> </TD></TR><TR><TD CLASS="l">332</TD><TD>                /**</TD></TR><TR><TD CLASS="l">333</TD><TD>                 * Pobiera wartosc bedaca iloscia wymiarow w tablicy.</TD></TR><TR><TD CLASS="l"><A NAME="b">334</A></TD><TD>                 * @param array tablica danych dla ktorej okreslamy wymiar</TD></TR><TR><TD CLASS="l">335</TD><TD>                 * @return wymiar ktory posiada tablica</TD></TR><TR><TD CLASS="l">336</TD><TD>                 */</TD></TR><TR><TD CLASS="l">337</TD><TD>                private final int getDimension(final Object array) {</TD></TR><TR CLASS="z"><TD CLASS="l">338</TD><TD>                    int dim = 0;</TD></TR><TR CLASS="z"><TD CLASS="l">339</TD><TD>                    java.lang.Class&lt;?&gt; cls = array.getClass();</TD></TR><TR CLASS="z"><TD CLASS="l">340</TD><TD>                    while (cls.isArray()) {</TD></TR><TR CLASS="z"><TD CLASS="l">341</TD><TD>                            dim++;</TD></TR><TR CLASS="z"><TD CLASS="l">342</TD><TD>                            cls = cls.getComponentType();</TD></TR><TR><TD CLASS="l">343</TD><TD>                    }</TD></TR><TR CLASS="z"><TD CLASS="l">344</TD><TD>                    return dim;</TD></TR><TR><TD CLASS="l">345</TD><TD>                  }</TD></TR><TR><TD CLASS="l">346</TD><TD> </TD></TR><TR><TD CLASS="l">347</TD><TD>                /**</TD></TR><TR><TD CLASS="l">348</TD><TD>                 * Pobiera wartosc okreslonego pola z klasy.</TD></TR><TR><TD CLASS="l">349</TD><TD>                 * @param fromClass z jakiej klasy, fromField ktore pole</TD></TR><TR><TD CLASS="l"><A NAME="c">350</A></TD><TD>                 * @return obiekt wskazany przez parametry</TD></TR><TR><TD CLASS="l">351</TD><TD>                 */</TD></TR><TR><TD CLASS="l">352</TD><TD>                private final Object getValue (final Object fromClass, final Field fromField) {</TD></TR><TR><TD CLASS="l">353</TD><TD>                        try {</TD></TR><TR CLASS="z"><TD CLASS="l">354</TD><TD>                                return fromField.get(fromClass);                        </TD></TR><TR><TD CLASS="l">355</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">356</TD><TD>                        catch (IllegalArgumentException e) {</TD></TR><TR CLASS="z"><TD CLASS="l">357</TD><TD>                                System.err.println(&#34;Podano niewlasciwy argument!&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">358</TD><TD>                                return null;</TD></TR><TR><TD CLASS="l">359</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">360</TD><TD>                        catch (IllegalAccessException e) {</TD></TR><TR CLASS="z"><TD CLASS="l">361</TD><TD>                                System.err.println(&#34;Brak dostepu pola klasy!&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">362</TD><TD>                                return null;</TD></TR><TR><TD CLASS="l">363</TD><TD>                        }</TD></TR><TR><TD CLASS="l">364</TD><TD>                }</TD></TR><TR><TD CLASS="l">365</TD><TD> </TD></TR><TR><TD CLASS="l">366</TD><TD>                /**</TD></TR><TR><TD CLASS="l">367</TD><TD>                 * Klasa pozwalajÄ…ca zapis do formatu RDF klas w ustalonej</TD></TR><TR><TD CLASS="l">368</TD><TD>                 * &lt;a href=&#34;http://code.google.com/p/project4uz/wiki/FormatRDF&#34;&gt;konwencji&lt;/a&gt;.</TD></TR><TR><TD CLASS="l">369</TD><TD>                 * @author Kamil BuĹ›</TD></TR><TR><TD CLASS="l">370</TD><TD>                 * @version 1.0</TD></TR><TR><TD CLASS="l">371</TD><TD>                 * @since 17:39 11.05.2011</TD></TR><TR><TD CLASS="l">372</TD><TD>                 */</TD></TR><TR><TD CLASS="l">373</TD><TD>                protected class RDFWriter {</TD></TR><TR><TD CLASS="l">374</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">375</TD><TD>                         * StrumieĹ„ wyjĹ›ciowy do zapisu drzewa.</TD></TR><TR><TD CLASS="l">376</TD><TD>                         */</TD></TR><TR><TD CLASS="l">377</TD><TD>                        private final FileOutputStream out;</TD></TR><TR><TD CLASS="l">378</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">379</TD><TD>                         * Referencja do obiektu Document bÄ™dÄ™cego egzemplarzem obiektu</TD></TR><TR><TD CLASS="l">380</TD><TD>                         * DOM Document wykorzystywanego do budowy drzewa DOM.</TD></TR><TR><TD CLASS="l">381</TD><TD>                         */</TD></TR><TR><TD CLASS="l">382</TD><TD>                        private Document document;</TD></TR><TR><TD CLASS="l">383</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">384</TD><TD>                         * GĹ‚Ăłwna gaĹ‚Ä…Ĺş pliku rdf przechowujÄ…ca w postaci atrybutĂłw</TD></TR><TR><TD CLASS="l">385</TD><TD>                         * przestrzenie nazw.</TD></TR><TR><TD CLASS="l">386</TD><TD>                         */</TD></TR><TR><TD CLASS="l">387</TD><TD>                        private Element rootNameSpaces;</TD></TR><TR><TD CLASS="l">388</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">389</TD><TD>                         * PodgaĹ‚Ä…Ĺş gaĹ‚Ä™zi rootNameSpaces.</TD></TR><TR><TD CLASS="l">390</TD><TD>                         */</TD></TR><TR><TD CLASS="l">391</TD><TD>                        private Element mainDeclaration;</TD></TR><TR><TD CLASS="l">392</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">393</TD><TD>                         * PodgaĹ‚Ä…Ĺş gaĹ‚Ä™zi mainDeclaration przechowujÄ…ca kolekcjie</TD></TR><TR><TD CLASS="l">394</TD><TD>                         * klas i sekcjÄ™ import.</TD></TR><TR><TD CLASS="l">395</TD><TD>                         */</TD></TR><TR><TD CLASS="l">396</TD><TD>                        private Element mainSection;</TD></TR><TR><TD CLASS="l">397</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">398</TD><TD>                         * PodgaĹ‚Ä…Ĺş gaĹ‚Ä™zi mainSection.</TD></TR><TR><TD CLASS="l">399</TD><TD>                         */</TD></TR><TR><TD CLASS="l">400</TD><TD>                        private Element importDeclaration;</TD></TR><TR><TD CLASS="l">401</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">402</TD><TD>                         * PodgaĹ‚Ä…Ĺş gaĹ‚Ä™zi importDeclaration przechowujÄ…ca kolekcjÄ™</TD></TR><TR><TD CLASS="l">403</TD><TD>                         * klas do obiektĂłw nie przesĹ‚anych do strumienia.</TD></TR><TR><TD CLASS="l">404</TD><TD>                         */</TD></TR><TR><TD CLASS="l">405</TD><TD>                        private Element importSection;</TD></TR><TR><TD CLASS="l">406</TD><TD> </TD></TR><TR><TD CLASS="l">407</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">408</TD><TD>                         * Tworzy pusty dokument RDF.</TD></TR><TR><TD CLASS="l">409</TD><TD>                         * @param out Ĺ›ciezka do dokumentu RDF</TD></TR><TR><TD CLASS="l">410</TD><TD>                         * @throws ParserConfigurationException</TD></TR><TR><TD CLASS="l">411</TD><TD>                         */</TD></TR><TR CLASS="z"><TD CLASS="l">412</TD><TD>                        protected RDFWriter(final FileOutputStream out) throws ParserConfigurationException {</TD></TR><TR CLASS="z"><TD CLASS="l">413</TD><TD>                                this.out = out;</TD></TR><TR><TD CLASS="l">414</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">415</TD><TD>                                DocumentBuilderFactory factory =</TD></TR><TR CLASS="z"><TD CLASS="l">416</TD><TD>                                        DocumentBuilderFactory.newInstance();</TD></TR><TR CLASS="z"><TD CLASS="l">417</TD><TD>                                DocumentBuilder builder = factory.newDocumentBuilder();</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="15">418</A></TD><TD>                                this.document = builder.newDocument();</TD></TR><TR><TD CLASS="l">419</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">420</TD><TD>                                this.initializeDocument();</TD></TR><TR CLASS="z"><TD CLASS="l">421</TD><TD>                                this.initializeNameSpaces();</TD></TR><TR CLASS="z"><TD CLASS="l">422</TD><TD>                        }</TD></TR><TR><TD CLASS="l">423</TD><TD> </TD></TR><TR><TD CLASS="l">424</TD><TD>                        /**</TD></TR><TR><TD CLASS="l"><A NAME="1d">425</A></TD><TD>                         * Zapisuje drzewo pliku RDF do pliku wskazanego w konstruktorze.</TD></TR><TR><TD CLASS="l">426</TD><TD>                         * @throws TransformerException</TD></TR><TR><TD CLASS="l">427</TD><TD>                         */</TD></TR><TR><TD CLASS="l">428</TD><TD>                        protected final void write() throws TransformerException {</TD></TR><TR CLASS="z"><TD CLASS="l">429</TD><TD>                                mainSection.appendChild(importDeclaration);</TD></TR><TR><TD CLASS="l">430</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">431</TD><TD>                                Transformer t = TransformerFactory.newInstance().newTransformer();</TD></TR><TR CLASS="z"><TD CLASS="l">432</TD><TD>                                t.setOutputProperty(OutputKeys.INDENT, &#34;yes&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">433</TD><TD>                                t.setOutputProperty(OutputKeys.METHOD, &#34;xml&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">434</TD><TD>                                t.transform(new DOMSource(document), new StreamResult(out));</TD></TR><TR CLASS="z"><TD CLASS="l">435</TD><TD>                        }</TD></TR><TR><TD CLASS="l">436</TD><TD> </TD></TR><TR><TD CLASS="l"><A NAME="1b">437</A></TD><TD>                        /**</TD></TR><TR><TD CLASS="l">438</TD><TD>                         * Inicjalizuje standardowy dokument RDF wraz z wymaganymi sekcjami.</TD></TR><TR><TD CLASS="l">439</TD><TD>                         */</TD></TR><TR><TD CLASS="l">440</TD><TD>                        private void initializeDocument() {</TD></TR><TR CLASS="z"><TD CLASS="l">441</TD><TD>                                rootNameSpaces = document.createElement(&#34;rdf:RDF&#34;);</TD></TR><TR><TD CLASS="l">442</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">443</TD><TD>                                mainDeclaration = document.createElement(&#34;rdf:Description&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">444</TD><TD>                                mainDeclaration.setAttribute(&#34;rdf:about&#34;, &#34;project4uz:/main&#34;);</TD></TR><TR><TD CLASS="l">445</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">446</TD><TD>                                mainSection = document.createElement(&#34;main:objects&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">447</TD><TD>                                mainSection.setAttribute(&#34;rdf:parseType&#34;, &#34;Collection&#34;);</TD></TR><TR><TD CLASS="l">448</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">449</TD><TD>                                importDeclaration = document.createElement(&#34;rdf:Description&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">450</TD><TD>                                importDeclaration.setAttribute(&#34;rdf:about&#34;, &#34;project4uz:/import&#34;);</TD></TR><TR><TD CLASS="l">451</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">452</TD><TD>                                importSection = document.createElement(&#34;refnamespace:objects&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">453</TD><TD>                                importSection.setAttribute(&#34;rdf:parseType&#34;, &#34;Collection&#34;);</TD></TR><TR><TD CLASS="l">454</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">455</TD><TD>                                document.appendChild(rootNameSpaces);</TD></TR><TR CLASS="z"><TD CLASS="l">456</TD><TD>                                rootNameSpaces.appendChild(mainDeclaration);</TD></TR><TR CLASS="z"><TD CLASS="l">457</TD><TD>                                mainDeclaration.appendChild(mainSection);</TD></TR><TR><TD CLASS="l">458</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">459</TD><TD>                                importDeclaration.appendChild(importSection);</TD></TR><TR CLASS="z"><TD CLASS="l">460</TD><TD>                        }</TD></TR><TR><TD CLASS="l">461</TD><TD> </TD></TR><TR><TD CLASS="l"><A NAME="1c">462</A></TD><TD>                        /**</TD></TR><TR><TD CLASS="l">463</TD><TD>                         * Inicjalizuje wymagane przestrzenie nazw.</TD></TR><TR><TD CLASS="l">464</TD><TD>                         */</TD></TR><TR><TD CLASS="l">465</TD><TD>                        private void initializeNameSpaces() {</TD></TR><TR CLASS="z"><TD CLASS="l">466</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:rdf&#34;, &#34;http://www.w3.org/1999/02/22-rdf-syntax-ns#&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">467</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:float&#34;, &#34;float:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">468</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:byte&#34;, &#34;byte:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">469</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:short&#34;, &#34;short:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">470</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:long&#34;, &#34;long:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">471</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:char&#34;, &#34;char:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">472</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:int&#34;, &#34;int:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">473</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:double&#34;, &#34;double:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">474</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:boolean&#34;, &#34;boolean:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">475</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:String&#34;, &#34;String:/&#34;);</TD></TR><TR><TD CLASS="l">476</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">477</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:reference&#34;, &#34;reference:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">478</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:refnamespace&#34;, &#34;refnamespace:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">479</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:table&#34;, &#34;table:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">480</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:begintable&#34;, &#34;begintable:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">481</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:serial&#34;, &#34;serial:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">482</TD><TD>                                rootNameSpaces.setAttribute(&#34;xmlns:main&#34;, &#34;main:/&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">483</TD><TD>                        }</TD></TR><TR><TD CLASS="l">484</TD><TD> </TD></TR><TR><TD CLASS="l">485</TD><TD>                        /**</TD></TR><TR><TD CLASS="l"><A NAME="1a">486</A></TD><TD>                         * Zwraca gĹ‚ĂłwnÄ… gaĹ‚Ä…Ĺş sekcji main.</TD></TR><TR><TD CLASS="l">487</TD><TD>                         * @return galaz sekcji main</TD></TR><TR><TD CLASS="l">488</TD><TD>                         */</TD></TR><TR><TD CLASS="l">489</TD><TD>                        protected final Element getMainSection() {</TD></TR><TR CLASS="z"><TD CLASS="l">490</TD><TD>                                return mainSection;</TD></TR><TR><TD CLASS="l">491</TD><TD>                        }</TD></TR><TR><TD CLASS="l">492</TD><TD> </TD></TR><TR><TD CLASS="l">493</TD><TD>                        /**</TD></TR><TR><TD CLASS="l"><A NAME="19">494</A></TD><TD>                         * Zwraca gĹ‚ĂłwnÄ… gaĹ‚Ä…Ĺş sekcji import.</TD></TR><TR><TD CLASS="l">495</TD><TD>                         * @return gaĹ‚Ä…Ĺş sekcji import</TD></TR><TR><TD CLASS="l">496</TD><TD>                         */</TD></TR><TR><TD CLASS="l">497</TD><TD>                        protected final Element getImportSection() {</TD></TR><TR CLASS="z"><TD CLASS="l">498</TD><TD>                                return importSection;</TD></TR><TR><TD CLASS="l">499</TD><TD>                        }</TD></TR><TR><TD CLASS="l">500</TD><TD> </TD></TR><TR><TD CLASS="l">501</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">502</TD><TD>                         * Dodaje nowÄ… klasÄ™ do sekcji main.</TD></TR><TR><TD CLASS="l">503</TD><TD>                         * @param sciezkaKlasy Ĺ›cieĹĽka do klasy</TD></TR><TR><TD CLASS="l"><A NAME="18">504</A></TD><TD>                         * @param idKlasy ID klasy</TD></TR><TR><TD CLASS="l">505</TD><TD>                         * @return zwraca konfigurowalny obiekt klasy</TD></TR><TR><TD CLASS="l">506</TD><TD>                         */</TD></TR><TR><TD CLASS="l">507</TD><TD>                        protected final Class addClassToMain(final String sciezkaKlasy, final int idKlasy) {</TD></TR><TR CLASS="z"><TD CLASS="l">508</TD><TD>                                return new Class(sciezkaKlasy, idKlasy, mainSection, document);</TD></TR><TR><TD CLASS="l">509</TD><TD>                        }</TD></TR><TR><TD CLASS="l">510</TD><TD> </TD></TR><TR><TD CLASS="l">511</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">512</TD><TD>                         * Dodaje nowÄ… klasÄ™ do sekcji import.</TD></TR><TR><TD CLASS="l">513</TD><TD>                         * @param sciezkaKlasy Ĺ›cieĹĽka do klasy</TD></TR><TR><TD CLASS="l"><A NAME="17">514</A></TD><TD>                         * @param idKlasy ID klasy</TD></TR><TR><TD CLASS="l">515</TD><TD>                         * @return zwraca konfigurowalny obiekt klasy</TD></TR><TR><TD CLASS="l">516</TD><TD>                         */</TD></TR><TR><TD CLASS="l">517</TD><TD>                        protected final Class addClassToImport(final String sciezkaKlasy, final int idKlasy) {</TD></TR><TR CLASS="z"><TD CLASS="l">518</TD><TD>                                return new Class(sciezkaKlasy, idKlasy, importSection, document);</TD></TR><TR><TD CLASS="l">519</TD><TD>                        }</TD></TR><TR><TD CLASS="l">520</TD><TD> </TD></TR><TR><TD CLASS="l">521</TD><TD>                        /**</TD></TR><TR><TD CLASS="l">522</TD><TD>                         * Klasa reprentujÄ…ca w pliku RDF model klasy,</TD></TR><TR><TD CLASS="l">523</TD><TD>                         * posiadajÄ…cej pola rĂłĹĽnych typĂłw.</TD></TR><TR><TD CLASS="l">524</TD><TD>                         * @author Kamil BuĹ›</TD></TR><TR><TD CLASS="l">525</TD><TD>                         * @version 1.0</TD></TR><TR><TD CLASS="l">526</TD><TD>                         * @since 17:39 9.05.2011</TD></TR><TR><TD CLASS="l">527</TD><TD>                         */</TD></TR><TR><TD CLASS="l">528</TD><TD>                        protected class Class {</TD></TR><TR><TD CLASS="l">529</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">530</TD><TD>                                 * Referencja do obiektu Document bÄ™dÄ™cego egzemplarzem</TD></TR><TR><TD CLASS="l">531</TD><TD>                                 * obiektu DOM Document wykorzystywanego do budowy drzewa DOM.</TD></TR><TR><TD CLASS="l">532</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">533</TD><TD>                                private Document document;</TD></TR><TR><TD CLASS="l">534</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">535</TD><TD>                                 * Reprezentuje gaĹ‚Ä…Ĺş w sekcji main.</TD></TR><TR><TD CLASS="l">536</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">537</TD><TD>                                private Element mainSection;</TD></TR><TR><TD CLASS="l">538</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">539</TD><TD>                                 * Reprezentuje gaĹ‚Ä…Ĺş tej klasy.</TD></TR><TR><TD CLASS="l">540</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">541</TD><TD>                                private Element klasa;</TD></TR><TR><TD CLASS="l">542</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">543</TD><TD>                                 * id klasy.</TD></TR><TR><TD CLASS="l">544</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">545</TD><TD>                                private int id;</TD></TR><TR><TD CLASS="l">546</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">547</TD><TD>                                 * Ĺ›cieĹĽka klasy.</TD></TR><TR><TD CLASS="l">548</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">549</TD><TD>                                private String sciezkaKlasy;</TD></TR><TR><TD CLASS="l">550</TD><TD> </TD></TR><TR><TD CLASS="l">551</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">552</TD><TD>                                 * Tworzy obiekt klasy.</TD></TR><TR><TD CLASS="l">553</TD><TD>                                 * @param sciezkaKlasy okreĹ›la scieĹĽkÄ™ do klasy</TD></TR><TR><TD CLASS="l">554</TD><TD>                                 * @param id unikalny ID klasy w obrÄ™bie dokumentu</TD></TR><TR><TD CLASS="l">555</TD><TD>                                 * @param mainSection referencja do sekcji main w pliku RDF</TD></TR><TR><TD CLASS="l">556</TD><TD>                                 * @param document referencja do obiektu Document</TD></TR><TR><TD CLASS="l">557</TD><TD>                                 */</TD></TR><TR CLASS="z"><TD CLASS="l">558</TD><TD>                                protected Class(final String sciezkaKlasy, final int id, final Element mainSection,</TD></TR><TR><TD CLASS="l">559</TD><TD>                                                final Document document) {</TD></TR><TR CLASS="z"><TD CLASS="l">560</TD><TD>                                        this.document = document;</TD></TR><TR CLASS="z"><TD CLASS="l">561</TD><TD>                                        this.mainSection = mainSection;</TD></TR><TR CLASS="z"><TD CLASS="l">562</TD><TD>                                        this.id = id;</TD></TR><TR CLASS="z"><TD CLASS="l">563</TD><TD>                                        this.sciezkaKlasy = sciezkaKlasy;</TD></TR><TR><TD CLASS="l">564</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="1e">565</A></TD><TD>                                        klasa = document.createElement(&#34;rdf:Description&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">566</TD><TD>                                        klasa.setAttribute(&#34;rdf:about&#34;, &#34;project4uz:/&#34; + this.sciezkaKlasy + &#34;#ID&#34;</TD></TR><TR CLASS="z"><TD CLASS="l">567</TD><TD>                                                        + this.id);</TD></TR><TR CLASS="z"><TD CLASS="l">568</TD><TD>                                        this.mainSection.appendChild(klasa);</TD></TR><TR CLASS="z"><TD CLASS="l">569</TD><TD>                                }</TD></TR><TR><TD CLASS="l">570</TD><TD> </TD></TR><TR><TD CLASS="l">571</TD><TD>                                /**</TD></TR><TR><TD CLASS="l"><A NAME="25">572</A></TD><TD>                                 * Zwraca id klasy.</TD></TR><TR><TD CLASS="l">573</TD><TD>                                 * @return id klasy</TD></TR><TR><TD CLASS="l">574</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">575</TD><TD>                                protected final int getId() {</TD></TR><TR CLASS="z"><TD CLASS="l">576</TD><TD>                                        return id;</TD></TR><TR><TD CLASS="l">577</TD><TD>                                }</TD></TR><TR><TD CLASS="l">578</TD><TD> </TD></TR><TR><TD CLASS="l">579</TD><TD>                                /**</TD></TR><TR><TD CLASS="l"><A NAME="26">580</A></TD><TD>                                 * Zwraca Ĺ›cieĹĽkÄ™ do klasy.</TD></TR><TR><TD CLASS="l">581</TD><TD>                                 * @return Ĺ›cieĹĽka do klasy</TD></TR><TR><TD CLASS="l">582</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">583</TD><TD>                                protected final String getSciezkaKlasy() {</TD></TR><TR CLASS="z"><TD CLASS="l">584</TD><TD>                                        return sciezkaKlasy;</TD></TR><TR><TD CLASS="l">585</TD><TD>                                }</TD></TR><TR><TD CLASS="l">586</TD><TD> </TD></TR><TR><TD CLASS="l">587</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">588</TD><TD>                                 * Dodaje pole prymitywne do klasy.</TD></TR><TR><TD CLASS="l">589</TD><TD>                                 * @param nazwaZmiennej nazwa zmiennej</TD></TR><TR><TD CLASS="l">590</TD><TD>                                 * @param typ typ zmiennej</TD></TR><TR><TD CLASS="l"><A NAME="21">591</A></TD><TD>                                 * @param wartosc wartoĹ›c zmiennej</TD></TR><TR><TD CLASS="l">592</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">593</TD><TD>                                protected final void addPrimitive(final String nazwaZmiennej, final String typ,</TD></TR><TR><TD CLASS="l">594</TD><TD>                                                final String wartosc) {</TD></TR><TR CLASS="z"><TD CLASS="l">595</TD><TD>                                        Element addInt = document.createElement(typ + &#34;:&#34; + nazwaZmiennej);</TD></TR><TR CLASS="z"><TD CLASS="l">596</TD><TD>                                        Text textNode = document.createTextNode(&#34;&#34; + wartosc);</TD></TR><TR CLASS="z"><TD CLASS="l">597</TD><TD>                                        addInt.appendChild(textNode);</TD></TR><TR CLASS="z"><TD CLASS="l">598</TD><TD>                                        klasa.appendChild(addInt);</TD></TR><TR CLASS="z"><TD CLASS="l">599</TD><TD>                                }</TD></TR><TR><TD CLASS="l">600</TD><TD>                                </TD></TR><TR><TD CLASS="l">601</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">602</TD><TD>                                 * Dodaje pole serialVersionUID do klasy.</TD></TR><TR><TD CLASS="l">603</TD><TD>                                 * @param nazwaZmiennej nazwa zmiennej</TD></TR><TR><TD CLASS="l">604</TD><TD>                                 * @param typ typ zmiennej</TD></TR><TR><TD CLASS="l"><A NAME="23">605</A></TD><TD>                                 * @param wartosc wartoĹ›c zmiennej</TD></TR><TR><TD CLASS="l">606</TD><TD>                                 * @author Daniel Kur</TD></TR><TR><TD CLASS="l">607</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">608</TD><TD>                                protected final void addSerialVersion(final String wartosc) {</TD></TR><TR CLASS="z"><TD CLASS="l">609</TD><TD>                                        Element addInt = document.createElement(&#34;serial:serialVersionUID&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">610</TD><TD>                                        Text textNode = document.createTextNode(&#34;&#34; + wartosc);</TD></TR><TR CLASS="z"><TD CLASS="l">611</TD><TD>                                        addInt.appendChild(textNode);</TD></TR><TR CLASS="z"><TD CLASS="l">612</TD><TD>                                        klasa.appendChild(addInt);</TD></TR><TR CLASS="z"><TD CLASS="l">613</TD><TD>                                }</TD></TR><TR><TD CLASS="l">614</TD><TD> </TD></TR><TR><TD CLASS="l">615</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">616</TD><TD>                                 * Dodaje pole typu obiektowego do klasy.</TD></TR><TR><TD CLASS="l">617</TD><TD>                                 * @param nazwaZmiennej nazwa zmiennej</TD></TR><TR><TD CLASS="l">618</TD><TD>                                 * @param sciezka sciezka do innej klasy</TD></TR><TR><TD CLASS="l"><A NAME="22">619</A></TD><TD>                                 * @param id ID klasy</TD></TR><TR><TD CLASS="l">620</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">621</TD><TD>                                protected final void addReference(final String nazwaZmiennej, final String sciezka,</TD></TR><TR><TD CLASS="l">622</TD><TD>                                                final int id) {</TD></TR><TR CLASS="z"><TD CLASS="l">623</TD><TD>                                        Element addInt = document.createElement(&#34;reference:&#34; + nazwaZmiennej);</TD></TR><TR CLASS="z"><TD CLASS="l">624</TD><TD>                                        addInt.setAttribute(&#34;rdf:resource&#34;, &#34;project4uz:/&#34; + sciezka + &#34;#ID&#34; + id);</TD></TR><TR CLASS="z"><TD CLASS="l">625</TD><TD>                                        klasa.appendChild(addInt);</TD></TR><TR CLASS="z"><TD CLASS="l">626</TD><TD>                                }</TD></TR><TR><TD CLASS="l">627</TD><TD> </TD></TR><TR><TD CLASS="l">628</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">629</TD><TD>                                 * Dodaje pole typu obiektowego do klasy</TD></TR><TR><TD CLASS="l"><A NAME="20">630</A></TD><TD>                                 * nie posiadajÄ…ce referencji.</TD></TR><TR><TD CLASS="l">631</TD><TD>                                 * @param nazwaZmiennej nazwa zmiennej</TD></TR><TR><TD CLASS="l">632</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">633</TD><TD>                                protected final void addNullReference(final String nazwaZmiennej) {</TD></TR><TR CLASS="z"><TD CLASS="l">634</TD><TD>                                        Element addInt = document.createElement(&#34;reference:&#34; + nazwaZmiennej);</TD></TR><TR CLASS="z"><TD CLASS="l">635</TD><TD>                                        addInt.setAttribute(&#34;rdf:resource&#34;, &#34;project4uz:/&#34; + &#34;null&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">636</TD><TD>                                        klasa.appendChild(addInt);</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="24">637</A></TD><TD>                                }</TD></TR><TR><TD CLASS="l">638</TD><TD> </TD></TR><TR><TD CLASS="l">639</TD><TD>                                protected final Table addTable(final String nazwaTablicy, final String typ,</TD></TR><TR><TD CLASS="l">640</TD><TD>                                                final int iloscWymiarow, final int rozmiarWymiaru) {</TD></TR><TR CLASS="z"><TD CLASS="l">641</TD><TD>                                        Element nazwaZmiennejTablicy = document.createElement(&#34;table:&#34; + nazwaTablicy);</TD></TR><TR CLASS="z"><TD CLASS="l">642</TD><TD>                                        Element typTablicy = document.createElement(&#34;rdf:Description&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">643</TD><TD>                                        typTablicy.setAttribute(&#34;rdf:about&#34;, &#34;project4uz:/&#34; + typ);</TD></TR><TR CLASS="z"><TD CLASS="l">644</TD><TD>                                        Element iloscWymiarowTablicy = document.createElement(&#34;begintable:D&#34;</TD></TR><TR CLASS="z"><TD CLASS="l">645</TD><TD>                                                        + iloscWymiarow);</TD></TR><TR CLASS="z"><TD CLASS="l">646</TD><TD>                                        iloscWymiarowTablicy.setAttribute(&#34;rdf:parseType&#34;, &#34;Collection&#34;);</TD></TR><TR><TD CLASS="l">647</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">648</TD><TD>                                        this.klasa.appendChild(nazwaZmiennejTablicy);</TD></TR><TR CLASS="z"><TD CLASS="l">649</TD><TD>                                        nazwaZmiennejTablicy.appendChild(typTablicy);</TD></TR><TR CLASS="z"><TD CLASS="l">650</TD><TD>                                        typTablicy.appendChild(iloscWymiarowTablicy);</TD></TR><TR CLASS="z"><TD CLASS="l">651</TD><TD>                                        return new Table(iloscWymiarow, rozmiarWymiaru, iloscWymiarowTablicy, document);</TD></TR><TR><TD CLASS="l">652</TD><TD>                                }</TD></TR><TR><TD CLASS="l">653</TD><TD> </TD></TR><TR><TD CLASS="l">654</TD><TD>                                /**</TD></TR><TR><TD CLASS="l">655</TD><TD>                                 * Klasa reprezentujÄ…ca pole typu tablicowego.</TD></TR><TR><TD CLASS="l">656</TD><TD>                                 * @author Kamil BuĹ›</TD></TR><TR><TD CLASS="l">657</TD><TD>                                 * @version 1.2</TD></TR><TR><TD CLASS="l">658</TD><TD>                                 * @since 17:39 11.05.2011</TD></TR><TR><TD CLASS="l">659</TD><TD>                                 */</TD></TR><TR><TD CLASS="l">660</TD><TD>                                protected class Table {</TD></TR><TR><TD CLASS="l">661</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">662</TD><TD>                                         * Zmienna do ktĂłrej naleĹĽÄ… wszystkie</TD></TR><TR><TD CLASS="l">663</TD><TD>                                         * wymiary tej tablicy.</TD></TR><TR><TD CLASS="l">664</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">665</TD><TD>                                        private Element zmiennaTablicowa;</TD></TR><TR><TD CLASS="l">666</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">667</TD><TD>                                         * GaĹ‚Ä…Ĺş do ktĂłrej sÄ… dodawane elementy.</TD></TR><TR><TD CLASS="l">668</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">669</TD><TD>                                        private Element elementyTablicy;</TD></TR><TR><TD CLASS="l">670</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">671</TD><TD>                                         * Referencja do obiektu Document bÄ™dÄ…cego egzemplarzem</TD></TR><TR><TD CLASS="l">672</TD><TD>                                         * obiektu DOM Document wykorzystywanego do</TD></TR><TR><TD CLASS="l">673</TD><TD>                                         * budowy drzewa DOM.</TD></TR><TR><TD CLASS="l">674</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">675</TD><TD>                                        private Document document;</TD></TR><TR><TD CLASS="l">676</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">677</TD><TD>                                         * Przechowuje rozmiar tablicy.</TD></TR><TR><TD CLASS="l">678</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">679</TD><TD>                                        private int rozmiarWymiaruTablicy;</TD></TR><TR><TD CLASS="l">680</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">681</TD><TD>                                         * Przechowuje iloĹ›c podwymiarĂłw tej tablicy.</TD></TR><TR><TD CLASS="l">682</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">683</TD><TD>                                        private int iloscWymiarow;</TD></TR><TR><TD CLASS="l">684</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">685</TD><TD>                                         * ĹšceiĹĽka do obecnego wymiaru.</TD></TR><TR><TD CLASS="l">686</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">687</TD><TD>                                        private String hierarchiaWymiarow;</TD></TR><TR><TD CLASS="l">688</TD><TD> </TD></TR><TR><TD CLASS="l">689</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">690</TD><TD>                                         * Konstruktor tworzÄ…cy obiekt reprezentujÄ…cy tablicÄ™.</TD></TR><TR><TD CLASS="l">691</TD><TD>                                         * @param iloscWymiarow okreĹ›la iloĹ›c podwymiarĂłw</TD></TR><TR><TD CLASS="l">692</TD><TD>                                         * @param rozmiarWymiaruTablicy iloĹ›c elementĂłw tego wymiaru</TD></TR><TR><TD CLASS="l">693</TD><TD>                                         * @param zmiennaTablicowa zmienna do ktĂłrej naleĹĽÄ…</TD></TR><TR><TD CLASS="l">694</TD><TD>                                         * wszystkie wymiary tej tablicy</TD></TR><TR><TD CLASS="l">695</TD><TD>                                         * @param document egzemplarz obiektu DOM Document</TD></TR><TR><TD CLASS="l">696</TD><TD>                                         * wykorzystywanego do budowy drzewa DOM</TD></TR><TR><TD CLASS="l">697</TD><TD>                                         */</TD></TR><TR CLASS="z"><TD CLASS="l">698</TD><TD>                                        protected Table(final int iloscWymiarow, final int rozmiarWymiaruTablicy,</TD></TR><TR><TD CLASS="l">699</TD><TD>                                                        final Element zmiennaTablicowa, final Document document) {</TD></TR><TR CLASS="z"><TD CLASS="l">700</TD><TD>                                                this.zmiennaTablicowa = zmiennaTablicowa;</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="27">701</A></TD><TD>                                                this.document = document;</TD></TR><TR CLASS="z"><TD CLASS="l">702</TD><TD>                                                this.rozmiarWymiaruTablicy = rozmiarWymiaruTablicy;</TD></TR><TR CLASS="z"><TD CLASS="l">703</TD><TD>                                                this.iloscWymiarow = iloscWymiarow;</TD></TR><TR CLASS="z"><TD CLASS="l">704</TD><TD>                                                hierarchiaWymiarow = &#34;project4uz:/D&#34; + this.iloscWymiarow;</TD></TR><TR CLASS="z"><TD CLASS="l">705</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">706</TD><TD> </TD></TR><TR><TD CLASS="l">707</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">708</TD><TD>                                         * Metoda musi byc wywoĹ‚ana, aby</TD></TR><TR><TD CLASS="l">709</TD><TD>                                         * zainicjalizowac pierwszy wymiar tablicy.</TD></TR><TR><TD CLASS="l"><A NAME="2d">710</A></TD><TD>                                         * &lt;BR&gt; PĂłĹşniejsze wywoĹ‚ania sÄ… nie wskazane.</TD></TR><TR><TD CLASS="l">711</TD><TD>                                         * @return zwraca zainicjalizowany obiekt tablicy</TD></TR><TR><TD CLASS="l">712</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">713</TD><TD>                                        protected final Table initialize() {</TD></TR><TR CLASS="z"><TD CLASS="l">714</TD><TD>                                                Element wymiar = document.createElement(&#34;rdf:Description&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">715</TD><TD>                                                wymiar.setAttribute(&#34;rdf:about&#34;, this.hierarchiaWymiarow);</TD></TR><TR CLASS="z"><TD CLASS="l">716</TD><TD>                                                Element rozmiar = document.createElement(&#34;begintable:Size&#34;</TD></TR><TR CLASS="z"><TD CLASS="l">717</TD><TD>                                                                + this.rozmiarWymiaruTablicy);</TD></TR><TR CLASS="z"><TD CLASS="l">718</TD><TD>                                                elementyTablicy = document.createElement(&#34;rdf:Bag&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">719</TD><TD>                                                this.zmiennaTablicowa.appendChild(wymiar);</TD></TR><TR CLASS="z"><TD CLASS="l">720</TD><TD>                                                wymiar.appendChild(rozmiar);</TD></TR><TR CLASS="z"><TD CLASS="l">721</TD><TD>                                                rozmiar.appendChild(elementyTablicy);</TD></TR><TR CLASS="z"><TD CLASS="l">722</TD><TD>                                                return this;</TD></TR><TR><TD CLASS="l">723</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">724</TD><TD> </TD></TR><TR><TD CLASS="l">725</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">726</TD><TD>                                         * Tworzy pod wymiar na okreĹ›lonym miejscu w tablicy.</TD></TR><TR><TD CLASS="l">727</TD><TD>                                         * @param pozycja na jakiej pozycji w obecnej tablicy ma</TD></TR><TR><TD CLASS="l">728</TD><TD>                                         * zostac utworzony nowy wymiar, gdzie</TD></TR><TR><TD CLASS="l">729</TD><TD>                                         * pozycje zaczynajÄ… siÄ™ od 1</TD></TR><TR><TD CLASS="l">730</TD><TD>                                         * @param rozmiarWymiaruTablicy iloĹ›c</TD></TR><TR><TD CLASS="l">731</TD><TD>                                         * elementĂłw w nowym wymiarze</TD></TR><TR><TD CLASS="l">732</TD><TD>                                         * @return zwraca nowÄ… tablice</TD></TR><TR><TD CLASS="l"><A NAME="2f">733</A></TD><TD>                                         * reprezentujÄ…cÄ… nowy wymiar</TD></TR><TR><TD CLASS="l">734</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">735</TD><TD>                                        protected final Table makeNewDimension(final int pozycja,</TD></TR><TR><TD CLASS="l">736</TD><TD>                                                        final int rozmiarWymiaruTablicy) {</TD></TR><TR CLASS="z"><TD CLASS="l">737</TD><TD>                                                Table temp = new Table(this.iloscWymiarow - 1, rozmiarWymiaruTablicy,</TD></TR><TR CLASS="z"><TD CLASS="l">738</TD><TD>                                                                this.zmiennaTablicowa, this.document);</TD></TR><TR CLASS="z"><TD CLASS="l">739</TD><TD>                                                temp.makeName(this.hierarchiaWymiarow, &#34;E&#34; + pozycja);</TD></TR><TR CLASS="z"><TD CLASS="l">740</TD><TD>                                                referenceForNewDimension(pozycja, temp.getHierarchiaWymiarow());</TD></TR><TR CLASS="z"><TD CLASS="l">741</TD><TD>                                                temp.initialize();</TD></TR><TR CLASS="z"><TD CLASS="l">742</TD><TD>                                                return temp;</TD></TR><TR><TD CLASS="l">743</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">744</TD><TD> </TD></TR><TR><TD CLASS="l">745</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">746</TD><TD>                                         * Tworzy odpowiedniÄ… nazwÄ™ dla pod wymiaru.</TD></TR><TR><TD CLASS="l">747</TD><TD>                                         * @param before Ĺ›ciezka do podwymiaru</TD></TR><TR><TD CLASS="l"><A NAME="2e">748</A></TD><TD>                                         * @param after to co ma siÄ™ znaleĹşc po nazwie wymiaru</TD></TR><TR><TD CLASS="l">749</TD><TD>                                         * @return zwraca obiekt tablicy</TD></TR><TR><TD CLASS="l">750</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">751</TD><TD>                                        private Table makeName(final String before, final String after) {</TD></TR><TR CLASS="z"><TD CLASS="l">752</TD><TD>                                                String temp = this.hierarchiaWymiarow;</TD></TR><TR CLASS="z"><TD CLASS="l">753</TD><TD>                                                this.hierarchiaWymiarow = before;</TD></TR><TR CLASS="z"><TD CLASS="l">754</TD><TD>                                                this.hierarchiaWymiarow += (&#34;/&#34; + temp + &#34;/&#34; + after);</TD></TR><TR CLASS="z"><TD CLASS="l">755</TD><TD>                                                return this;</TD></TR><TR><TD CLASS="l">756</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">757</TD><TD> </TD></TR><TR><TD CLASS="l">758</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">759</TD><TD>                                         * Tworzy odpowiednie pole referencyjne</TD></TR><TR><TD CLASS="l">760</TD><TD>                                         * wskazujÄ…ce na nowo tworzony wymiar.</TD></TR><TR><TD CLASS="l">761</TD><TD>                                         * @param position na ktĂłrej pozycji ma zostac</TD></TR><TR><TD CLASS="l">762</TD><TD>                                         * zapisana referencja do nowego wyamiru</TD></TR><TR><TD CLASS="l">763</TD><TD>                                         * @param reference nazwa referencji</TD></TR><TR><TD CLASS="l"><A NAME="30">764</A></TD><TD>                                         * wskiazujÄ…cej na nowy wymiar</TD></TR><TR><TD CLASS="l">765</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">766</TD><TD>                                        private void referenceForNewDimension(final int position,</TD></TR><TR><TD CLASS="l">767</TD><TD>                                                        final String reference) {</TD></TR><TR CLASS="z"><TD CLASS="l">768</TD><TD>                                                Element element = document.createElement(&#34;rdf:_&#34; + position);</TD></TR><TR CLASS="z"><TD CLASS="l">769</TD><TD>                                                element.setAttribute(&#34;rdf:resource&#34;, reference);</TD></TR><TR CLASS="z"><TD CLASS="l">770</TD><TD>                                                this.elementyTablicy.appendChild(element);</TD></TR><TR CLASS="z"><TD CLASS="l">771</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">772</TD><TD> </TD></TR><TR><TD CLASS="l">773</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l"><A NAME="2c">774</A></TD><TD>                                         * Zwraca Ĺ›cieĹĽkÄ™ do obecnego wymiaru tablicy.</TD></TR><TR><TD CLASS="l">775</TD><TD>                                         * @return Ĺ›cieĹĽka do obecnego wymiaru tablicy</TD></TR><TR><TD CLASS="l">776</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">777</TD><TD>                                        private String getHierarchiaWymiarow() {</TD></TR><TR CLASS="z"><TD CLASS="l">778</TD><TD>                                                return hierarchiaWymiarow;</TD></TR><TR><TD CLASS="l">779</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">780</TD><TD> </TD></TR><TR><TD CLASS="l">781</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">782</TD><TD>                                         * Dodaje element typu prymitywnego do tablicy na</TD></TR><TR><TD CLASS="l">783</TD><TD>                                         * okreĹ›lonym miejscu, gdzie pozycje zaczynajÄ… siÄ™ od 1.</TD></TR><TR><TD CLASS="l">784</TD><TD>                                         * @param pozycja pozycja dodawanego elementu</TD></TR><TR><TD CLASS="l"><A NAME="2b">785</A></TD><TD>                                         * @param wartosc wartoĹ›c elementu</TD></TR><TR><TD CLASS="l">786</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">787</TD><TD>                                        protected final void addPrimitiveElement(final int pozycja,</TD></TR><TR><TD CLASS="l">788</TD><TD>                                                        final String wartosc) {</TD></TR><TR CLASS="z"><TD CLASS="l">789</TD><TD>                                                Element element = document.createElement(&#34;rdf:_&#34; + pozycja);</TD></TR><TR CLASS="z"><TD CLASS="l">790</TD><TD>                                                Text text = document.createTextNode(wartosc);</TD></TR><TR CLASS="z"><TD CLASS="l">791</TD><TD>                                                element.appendChild(text);</TD></TR><TR CLASS="z"><TD CLASS="l">792</TD><TD>                                                elementyTablicy.appendChild(element);</TD></TR><TR CLASS="z"><TD CLASS="l">793</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">794</TD><TD> </TD></TR><TR><TD CLASS="l">795</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">796</TD><TD>                                         * Dodaje element typu obiektowego do tablicy</TD></TR><TR><TD CLASS="l">797</TD><TD>                                         * na okreĹ›lonym miejscu, gdzie pozycje</TD></TR><TR><TD CLASS="l">798</TD><TD>                                         * zaczynajÄ… siÄ™ od 1.</TD></TR><TR><TD CLASS="l">799</TD><TD>                                         * @param pozycja pozycja dodawanego elementu</TD></TR><TR><TD CLASS="l">800</TD><TD>                                         * @param referencja referencja do innej klasy</TD></TR><TR><TD CLASS="l"><A NAME="2a">801</A></TD><TD>                                         * @param id id innej klasy</TD></TR><TR><TD CLASS="l">802</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">803</TD><TD>                                        protected final void addObjectElement(final int pozycja, final String referencja,</TD></TR><TR><TD CLASS="l">804</TD><TD>                                                        final int id) {</TD></TR><TR CLASS="z"><TD CLASS="l">805</TD><TD>                                                Element element = document.createElement(&#34;rdf:_&#34; + pozycja);</TD></TR><TR CLASS="z"><TD CLASS="l">806</TD><TD>                                                element.setAttribute(&#34;rdf:resource&#34;, &#34;project4uz:/&#34; + referencja</TD></TR><TR CLASS="z"><TD CLASS="l">807</TD><TD>                                                                + &#34;#ID&#34; + id);</TD></TR><TR CLASS="z"><TD CLASS="l">808</TD><TD>                                                elementyTablicy.appendChild(element);</TD></TR><TR CLASS="z"><TD CLASS="l">809</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">810</TD><TD> </TD></TR><TR><TD CLASS="l">811</TD><TD>                                        /**</TD></TR><TR><TD CLASS="l">812</TD><TD>                                         * Dodaje niezainicjowany element typu obiektowego lub</TD></TR><TR><TD CLASS="l">813</TD><TD>                                         * prymitywnego (prymitywnego jeĹĽeli poniĹĽszy wymiar</TD></TR><TR><TD CLASS="l">814</TD><TD>                                         * nie zostaĹ‚ zainicjowany) do tablicy na okreĹ›lonym</TD></TR><TR><TD CLASS="l"><A NAME="29">815</A></TD><TD>                                         * miejscu, gdzie pozycje zaczynajÄ… siÄ™ od 1.</TD></TR><TR><TD CLASS="l">816</TD><TD>                                         * @param pozycja pozycja dodawanego elementu</TD></TR><TR><TD CLASS="l">817</TD><TD>                                         */</TD></TR><TR><TD CLASS="l">818</TD><TD>                                        protected final void addNullElement(final int pozycja) {</TD></TR><TR CLASS="z"><TD CLASS="l">819</TD><TD>                                                Element element = document.createElement(&#34;rdf:_&#34; + pozycja);</TD></TR><TR CLASS="z"><TD CLASS="l">820</TD><TD>                                                element.setAttribute(&#34;rdf:resource&#34;, &#34;project4uz:/&#34; + &#34;null&#34;);</TD></TR><TR CLASS="z"><TD CLASS="l">821</TD><TD>                                                elementyTablicy.appendChild(element);</TD></TR><TR CLASS="z"><TD CLASS="l">822</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">823</TD><TD>                                }</TD></TR><TR><TD CLASS="l">824</TD><TD>                        }</TD></TR><TR><TD CLASS="l">825</TD><TD>                }</TD></TR><TR><TD CLASS="l">826</TD><TD>        }</TD></TR><TR><TD CLASS="l">827</TD><TD>}</TD></TR></TABLE><P></P><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TD CLASS="nv">[<A HREF="../Raport testu z wersji alfa 30.05.2011.html">all classes</A>][<A HREF="5.html">com.googlecode.project4uz</A>]</TD></TR><TR><TD CLASS="tl"><A HREF="http://www.eclemma.org/support.html">EMMA 2.0.5312 EclEmma Fix 2</A> (C) Vladimir Roubtsov</TD></TR></TABLE></BODY></HTML>